package com.feinno.urcs.group.entity;


import com.feinno.superpojo.type.EnumInteger;

/**
 * Created by liufeng on 2015/5/14.
 */
public enum GroupMessageType implements EnumInteger {
    TEXT(1,"TEXT"),
    IMG(2,"IMG"),
    AUDIO(3,"AUDIO"),
    VIDEO(4,"VIDEO"),
    OUTCE(5,"OUTCE"),
    LOCATION(6,"LOCATION"),
    CARD(7,"CARD"),
    FILE(8,"FILE"),
    CLOUDFILE(9, "CLOUDFILE"),
    ;
    private int value;
    private String type;
    GroupMessageType(int value,String type ) {
        this.value = value;
        this.type = type;
        //GroupMessageType.put(this);
    }

    public int intValue() {
        return value;
    }

    public String getType() {
        return type;
    }

    public String toString() {
        return type;
    }

//    public static GroupMessageType fromString(String type) {
//        GroupMessageType r = types.get(type);
//        if (r == null) {
//            throw new IllegalArgumentException("Unknown MessageType:" + type);
//        }
//        return r;
//    }
//
//    private static void put(GroupMessageType a) {
//        types.put(a.getType(), a);
//    }
//
//    private static Map<String, GroupMessageType> types = new HashMap<>();
}
